
-- procedure to get a user
-- returns a row of user if exists, else return null
IF OBJECT_ID('getUser') IS NOT NULL
BEGIN
	DROP PROCEDURE getUser;
END
GO
CREATE PROCEDURE getUser
	@UserId			INT
AS
BEGIN
	SELECT * FROM users WHERE userid = @UserId;
END
GO
